clear all; clc; close all;
RC = 1e-6;
T = RC/3;
as = [RC 1]; bs = [1];
[Hs, w] = freqs(bs, as);
az = [1+2*RC/T, 1-2*RC/T]; bz = [1, 1];
Hz = freqz(bz, az);
figure(1)
plot(w/2/pi/1000, abs(Hs), ...
((1:length(Hz)) - 1)/ length(Hz) *1/T/2/1000, abs(Hz))
xlabel('f, kHz'); ylabel('|H|')
legend('|H(s)|','|H(z)|'); 
grid on